<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" href="css/fancybox.css">
<link rel="stylesheet" href="css/index.css">
<script type="text/javascript" src="js/jquery.js"></script>	
<script type="text/javascript" src="js/fancybox.js"></script>
<script type="text/javascript" src="js/SuperSlide.js"></script>
</head>
<body>
<div class="header">
	<div class="container">
		<div class="left"><a href="###"><h1></h1></a></div>
		<div class="center">
			<li><a href="###">首页</a></li>
			<li><a href="###">隐形车衣</a></li>
			<li><a href="###">玻璃防爆膜</a></li>
			<li><a href="###">车身改色膜</a></li>
			<li><a href="###">施工案例</a></li>
			<li><a href="###">报价系统</a></li>
			<li><a href="###">质保查询</a></li>
			<li><a href="###">关于我们</a>
				<div class="des">
					<div class="main clearfix">
						<a href="###">公司简介</a>
						<a href="###">联系我们</a>
						<a href="###">在线留言</a>
					</div>
				</div>
			</li>
		</div>	
		<div class="right"><button></button></div>
	</div>
</div>

<div class="messge main">
	<h3>在线留言</h3>
	<form action="">
		<input type="text" name="phone" placeholder="电话">
		<input type="text" name="name" placeholder="名字">
		<input type="text" name="email" placeholder="邮箱">
		<input type="text" placeholder="所在城市">
		<!-- <input type="text" placeholder="欢迎留下您的宝贵意见"> -->
		<textarea rows="3" cols="3" name="content" placeholder="欢迎留下您的宝贵意见"></textarea>
		<div class="reg_box">
			<input type="text" placeholder="验证码" name="verify">
			<div class="img_box"><img src="images/reg.jpg" alt=""></div>
		</div>
		<button class="msg_submit">提交留言</button>
	</form>
</div>



<div class="footer">
	<div class="main">
		<div class="bl">
			<div class="company"> &copy;广州南途汽车用品有限公司 </div>
			<a href="###">粤ICP备19142218号-1</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;技术支持：云路科技
		</div>
		<div class="br">
			<div class="bshare-custom icon-medium-plus">
				<div class="bsPromo bsPromo2"></div>
				<a title="分享到Facebook" class="bshare-facebook" href="javascript:void(0);"></a>
				<a title="分享到推他" class="bshare-tuita" href="javascript:void(0);"></a>
				<a title="分享到微信" class="bshare-weixin" href="javascript:void(0);"></a>
			</div>
		</div>
	</div>
</div>




<script type="text/javascript" charset="utf-8" src="http://static.bshare.cn/b/buttonLite.js#style=-1&amp;uuid=&amp;pophcol=2&amp;lang=zh"></script>
<script type="text/javascript" charset="utf-8" src="http://static.bshare.cn/b/bshareC0.js"></script>
	
<script src="js/index.js"></script>
<script>
	
	//前台验证
	$('.msg_submit').on('click', function(){
	    
	    //验证名字
	    var name = $("input[name='name']").val().trim();
	    if(name.length <= 0){
	        alert('姓名不能为空！');
	        $("input[name='name']").focus();
	        return false;
	    }
	
	    //验证邮箱
	    var email = $("input[name='email']").val().trim();
	    if(email.length <= 0){
	        alert('邮箱不能为空！');
	        $("input[name='email']").focus();
	        return false;
	    }  
	
	    //验证电话
	    var phone = $("input[name='phone']").val().trim();
	    if(phone.length <= 0){
	        alert('联系电话不能为空！');
	        $("input[name='phone']").focus();
	        return false;
	    }      
	
	     //验证码
	     var verify = $("input[name='verify']").val().trim();
	     if(verify.length != 4){
	         alert('请输入4位验证码！');
	         $("input[name='verify']").focus();
	         return false;
	     }
	    
	    return true;
	});
	
	 var verifyurl = $('#verifyimg').attr('src');
	 $('#verifyimg').on('click', function(){
	     if(verifyurl.indexOf('?') > 0){
	         $('#verifyimg').attr('src', verifyurl + '&random=' + Math.random());
	     }else{
	         $('#verifyimg').attr('src', verifyurl + '?random=' + Math.random());
	     }
	 });        
	    
</script>
</body>
</html>
